<template>
  <div>
    page one
    <Button @click="testFullInfo">{{ info.name }}</Button>
    <Button @click="jumpTest">请求后跳转</Button>
    <div class="testFullInfo-style">这是一个好故事</div>
    <div class="p2v">px to viewport</div>
  </div>
</template>

<script setup>
import { reactive } from 'vue'
import { Button } from 'vant'
import { post, getInfo } from '../shared/request'

const info = reactive({
  name: 'zhang',
})
const data = {
  Index_BaseModel:
    '{"WorkingCityCode":"310100","WorkingCityName":"上海市 上海市","HuKouType":0,"WorkIncomeType":0,"SpecialAdditionalType":0,"SocialSecurity":"19999.00","PublicFundBase":"19999.00","WorkIncome":"19999.00","SpecialAdditional":"2000"}',
  SupportElderRatio: '',
  MedicalTreatmentMoneyRatio: '',
  MedicalTreatmentMoneyOther: '',
  UnemploymentRatio: '',
  PublicFundBaseRatio: '',
  Multiple_1: '',
  Multiple_2: '',
  Multiple_3: '',
  Multiple_4: '',
  Multiple_5: '',
  Multiple_6: '',
  Multiple_7: '',
  Multiple_8: '',
  Multiple_9: '',
  Multiple_10: '',
  Multiple_11: '',
  Multiple_12: '',
  QuickEntry_Model: '',
  SingleEntry_Model: '',
}
getInfo('/tax/calculate', data).then((res) => console.log('res', res))

const testFullInfo = () => {
  info.name = 'san'
  getInfo('/tax/calculate', data, { dataLevel: 'full' }).then((res) => console.log('res', res))
}

const jumpTest = async () => {
  const res = await post('/tax/calculate', data)
  console.log(res)
}
</script>

<style>
.testFullInfo-style {
  color: var(--color-red);
}
.p2v {
  width: 200px;
  height: 200px;
  background: var(--color-red);
}
a,
b {
  color: red;

  & c,
  & d {
    color: white;
  }
}
</style>
